package com.wlwx.simulator.message.outbound;

import com.wlwx.simulator.codec.CMPPCommand;
import com.wlwx.simulator.message.basic.BaseOutBoundMessage;

public class LoginOutBoundResponse extends BaseOutBoundMessage {
    private byte status;

    //16bytes
    private String authenticatorISMG;

    private byte version;

    public LoginOutBoundResponse(int sequenceId) {
        super(CMPPCommand.CMPP_LOGIN_RESP_COMMAND, sequenceId);
    }

    public byte getStatus() {
        return status;
    }

    public void setStatus(byte status) {
        this.status = status;
    }

    public String getAuthenticatorISMG() {
        return authenticatorISMG;
    }

    public void setAuthenticatorISMG(String authenticatorISMG) {
        this.authenticatorISMG = authenticatorISMG;
    }

    public byte getVersion() {
        return version;
    }

    public void setVersion(byte version) {
        this.version = version;
    }

    public byte[] getBody() {
        byte[] bytes = new byte[18];
        bytes[0] = 0x00;
        byte[] destBytes = authenticatorISMG.getBytes();
        System.arraycopy(bytes, 1, destBytes, 0, 16);
        bytes[17] = 0x20;
        return bytes;
    }

}
